import {createApp} from 'vue'
import router from './base/router'
import App from './App.vue'
import pinia from "@/base/stores";
import '@/base/ts/amis/Global.ts'
import 'element-plus/dist/index.css'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import {initStyleTheme} from "@/base/ts/style.ts";
import {initDict} from "@/base/ts/service/DictService.ts";
import {refreshUserInfo} from "@/base/ts/service/AuthService.ts";
import {initI18nPack} from "@/base/ts/service/I18nService.ts";

const app = createApp(App)

app.use(ElementPlus, {locale: zhCn})
app.use(pinia)
app.use(router)
app.mount('#app')

//引入自定义样式
initStyleTheme();

//初始化数据字典
initDict();

//注册全局amis方法
refreshUserInfo();

//初始化多语言
initI18nPack();
